package com.flyduck.mall.oms.remote.service.impl;

import com.flyduck.mall.common.core.utils.BeanUtils;
import com.flyduck.mall.oms.mapper.OmsOrderMapper;
import com.flyduck.mall.oms.remote.service.RemoteOrderService;
import com.flyduck.mall.oms.domain.OmsOrder;
import com.flyduck.mall.oms.api.vo.RemoteOrderRespVO;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * RemoteOrderServiceImpl
 * </p>
 *
 * @author flyduck
 * @since 2024-07-23
 */
@DubboService
public class RemoteOrderServiceImpl implements RemoteOrderService {

    @Resource
    private OmsOrderMapper omsOrderMapper;

    @Override
    public RemoteOrderRespVO getOrderById(Long id) {
        OmsOrder omsOrder = omsOrderMapper.selectById(id);
        return BeanUtils.toBean(omsOrder, RemoteOrderRespVO.class);
    }
}
